import { getUserList } from './api';
export default {
    namespace: 'dashboard',
    state: {
        userList: [],
        item: {}
    },
    reducers: {
        save(state: any, { payload }: any) {
            const newState = Object.assign({}, state, payload);
            return newState;
        }
    },
    effects: {
        *getList({ payload }: any, { put, call }: any) {
            const response = yield call(getUserList, payload);
            yield put({
                type: 'save',
                payload: { userList: response }
            });
        }
    }
};
